package com.central.scheduler.spi.task.request;

import com.central.common.enums.PrivilegeType;
import com.central.common.model.DatasourceInfo;
import lombok.Getter;
import lombok.Setter;

import java.io.Serializable;
import java.util.Map;
import java.util.Set;

/**
 * @author Tindy
 * @date 2021/10/29
 * @describe
 *  master/worker task transport
 */
@Getter
@Setter
public class DataxTaskExecutionContext implements Serializable {

    /**
     * reader datasourceInfo
     */
    private DatasourceInfo readerDatasource;
    /**
     * writer datasourceInfo
     */
    private DatasourceInfo writerDatasource;

    //key is datasourceId.dbname.tablename,value is privilege list
    private Map<String, Set<PrivilegeType>> readerTablePrivileges;
    //key is datasourceId.dbname.tablename,value is privilege list
    private Map<String, Set<PrivilegeType>> writerTablePrivileges;


}
